package com.wqb.server.utils;

import com.wqb.server.pojo.Admin;
import org.springframework.security.core.context.SecurityContextHolder;

/**
 * @author: 万秋泊
 * @Date: 2022/3/20 19:18
 * @Description: 操作员工具类
 */
public class AdminUtils {
    /**
     * 获取当前登录操作员
     *
     * @return
     */
    public static Admin getCurrentAdmin() {
        return (Admin) SecurityContextHolder.getContext().getAuthentication().getPrincipal();
    }
}
